/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.st.entity;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.List;
import com.jeesite.common.collect.ListUtils;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 物料转换单Entity
 * @author HOHD
 * @version 2021-03-10
 */
@Table(name="st_material_convert_bill", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="bill_no", attrName="billNo", label="单据号"),
		@Column(name="bill_date", attrName="billDate", label="单据日期"),
		@Column(name="approve_status", attrName="approveStatus", label="审批状态"),
		@Column(name="approve_man", attrName="approveMan", label="审批人"),
		@Column(name="approve_man_code", attrName="approveManCode", label="审批人编码"),
		@Column(name="apply_man", attrName="applyMan", label="申请人"),
		@Column(name="apply_man_code", attrName="applyManCode", label="申请人编码"),
		@Column(name="create_date", attrName="createDate", label="create_date", isUpdate=false, isQuery=false),
		@Column(name="create_by", attrName="createBy", label="create_by", isUpdate=false, isQuery=false),
		@Column(name="remarks", attrName="remarks", label="备注", queryType=QueryType.LIKE),
	}, orderBy="a.id DESC"
)
public class StMaterialConvertBill extends DataEntity<StMaterialConvertBill> {
	
	private static final long serialVersionUID = 1L;
	private String billNo;		// 单据号
	private Date billDate;		// 单据日期
	private Integer approveStatus;		// 审批状态
	private String approveMan;		// 审批人
	private String approveManCode;		// 审批人编码
	private String applyMan;		// 申请人
	private String applyManCode;		// 申请人编码
	private List<StMaterialConvertBillDetail> stMaterialConvertBillDetailList = ListUtils.newArrayList();		// 子表列表
	
	public StMaterialConvertBill() {
		this(null);
	}

	public StMaterialConvertBill(String id){
		super(id);
	}
	
	@Length(min=0, max=20, message="单据号长度不能超过 20 个字符")
	public String getBillNo() {
		return billNo;
	}

	public void setBillNo(String billNo) {
		this.billNo = billNo;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getBillDate() {
		return billDate;
	}

	public void setBillDate(Date billDate) {
		this.billDate = billDate;
	}
	
	public Integer getApproveStatus() {
		return approveStatus;
	}

	public void setApproveStatus(Integer approveStatus) {
		this.approveStatus = approveStatus;
	}
	
	@Length(min=0, max=5, message="审批人长度不能超过 5 个字符")
	public String getApproveMan() {
		return approveMan;
	}

	public void setApproveMan(String approveMan) {
		this.approveMan = approveMan;
	}
	
	@Length(min=0, max=20, message="审批人编码长度不能超过 20 个字符")
	public String getApproveManCode() {
		return approveManCode;
	}

	public void setApproveManCode(String approveManCode) {
		this.approveManCode = approveManCode;
	}
	
	@Length(min=0, max=5, message="申请人长度不能超过 5 个字符")
	public String getApplyMan() {
		return applyMan;
	}

	public void setApplyMan(String applyMan) {
		this.applyMan = applyMan;
	}
	
	@Length(min=0, max=20, message="申请人编码长度不能超过 20 个字符")
	public String getApplyManCode() {
		return applyManCode;
	}

	public void setApplyManCode(String applyManCode) {
		this.applyManCode = applyManCode;
	}
	
	public List<StMaterialConvertBillDetail> getStMaterialConvertBillDetailList() {
		return stMaterialConvertBillDetailList;
	}

	public void setStMaterialConvertBillDetailList(List<StMaterialConvertBillDetail> stMaterialConvertBillDetailList) {
		this.stMaterialConvertBillDetailList = stMaterialConvertBillDetailList;
	}
	
}